package main

import "fmt"

func main() {
	array := []int{2, 5, 6, 0, 0, 1, 2}
	target := 0
	ans := check(array, target)
	fmt.Println(ans)
}

// 遍历
func check(array []int, target int) bool {
	n := len(array)
	for i := 0; i < n; i++ {
		if array[i] == target {
			return true
		}
	}
	return false
}
